require(["jquery",'public'],function($,public) {
    //public.headertitle('个人中心');
    public.footer(1);
    public.allocator();

    function getData(){
    	$.ajax({
    		data:{token: public.getSession('token')},
	        type: 'post',
	        dataType: 'json',
            async: false,
	        url: MODULE+'Index/personal',	        
	    }).success(function (res) {
	        console.log(res);
            if(res.code == 0){
    	        $('.my_head_name').html(res.data.user_username);
    	        $('.my_head_email').html(res.data.user_email);
    	        $('.my_head_img').attr('style','background-image:url('+PUBLIC+res.data.user_picture_path+')');
                if(res.data.user_open != 1){
                    $('.my_conts').addClass('hide');
                    $('.my_cont_item_open_shop').removeClass('hide').siblings('.my_cont_item').addClass('hide').end().closest('.my_conts').removeClass('hide');                
                }
            }
	    }).fail(function (jqXHR, textStatus, errorThrown) {});
    }

    getData();

    //页面加载完毕
    public.loaded();
})